Skip to main content

semi-colon

Type

keyword

Summary

The character ; is used to place more than one statement on a single line.

Syntax

;

Description

Use the ; character to compress code into fewer visible lines for easier reading.

Lines that are split with ; are shown in the script editor as a single line, but when executed, are treated as multiple lines of code. The following line counts as three statements:

    go card 1; beep 2; answer the date

is the same as:

    go card 1
beep 2
answer the date

A ; character which is used within a literal string does not signal a new line, because the ; is treated as part of the string instead of being treated as a line break.

The advantage of using the ; character are fewer physical lines of code which can mean marginally smaller stack file sizes. The disadvantage is that it can be harder to read and debug the code.

Examples

go next card; wait 1 second; go previous card
local x
repeat with x = 1 to 10; put x after field 1; end repeat

keyword: character, backslash

glossary: line, string, literal string, statement, script editor, execute

Compatibility and Support

Introduced

LiveCode 1.0

OS

mac

windows

linux

ios

android

Platforms

desktop

server

mobile

Thank you for your feedback!

Was this page helpful?